/*
 * @Author: 胡俊/treence
 * @Date: 2022-05-18 13:41:31
 * @LastEditors: 徐伟杰
 * @LastEditTime: 2022-10-26 11:39:19
 * @Description: 
 * @Email: treence@gmail.com
 * @Company: 3xData
 * @youWant: add you want
 */
import globalPostRequest from '@/request/globalPostRequest.js'

// 机关信息更新
export function organizeInfo_update (data, callback) {
    return globalPostRequest({
        url: '/agencyInfo',
        method: 'put',
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        data,
        callback
    })
}

// 查看
export function organizeInfo_form (data, callback) {
    return globalPostRequest({
        url: '/agencyInfo/getAgencyVO?agencyId=' + data,
        method: 'get',
        callback
    })
}

// 新增质量体系文件（安全评估）
export function safety_save (data, callback) {
    return globalPostRequest({
        url: '/safety',
        method: 'post',
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        data,
        callback
    })
}
// 修改质量体系文件（安全评估）
export function safety_update (data, callback) {
    return globalPostRequest({
        url: '/safety',
        method: 'put',
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        data,
        callback
    })
}

// 新增质量体系文件（维护保养）
export function maintenance_save (data, callback) {
    return globalPostRequest({
        url: '/maintenance',
        method: 'post',
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        data,
        callback
    })
}
// 修改质量体系文件（维护保养）
export function maintenance_update (data, callback) {
    return globalPostRequest({
        url: '/maintenance',
        method: 'put',
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        data,
        callback
    })
}

// 查询设备信息列表
export function listDeviceInfo (data, callback) {
    return globalPostRequest({
        url: '/deviceInfo/list',
        method: 'get',
        data,
        callback
    })
}

// 查询设备信息详细
export function getDeviceInfo (deviceId, callback) {
    return globalPostRequest({
        url: '/deviceInfo/byId/' + deviceId,
        method: 'get',
        callback
    })
}

// 新增设备信息
export function addDeviceInfo (data, callback) {
    return globalPostRequest({
        url: '/deviceInfo',
        method: 'post',
        data,
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        callback
    })
}

// 修改设备信息
export function updateDeviceInfo (data, callback) {
    return globalPostRequest({
        url: '/deviceInfo',
        method: 'put',
        data,
        header: {
            'content-type': 'application/json;charset=UTF-8'
        },
        callback
    })
}

// 删除设备信息
export function delDeviceInfo (deviceId, callback) {
    return globalPostRequest({
        url: '/deviceInfo/' + deviceId,
        method: 'delete',
        callback
    })
}

// 提交审核功能接口
export function agencyInfo (data, callback) {
    return globalPostRequest({
        url: '/agencyInfo/commit',
        data,
        method: 'post',
        callback
    })
}

// 查询修改日志功能接口
export function getJournal (data, callback) {
    return globalPostRequest({
        url: '/module/agencyOperLog/list',
        data,
        method: 'get',
        callback
    })
}